include rules.make



#==================================================================================================
# busybox-1.24.1
#==================================================================================================
busybox_config:
	@cd busybox-1.24.1 && \
		cp config_okay .config
	@echo $@ done

busybox_build:
	@$(MAKE) -C busybox-1.24.1 ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) \
		CONFIG_PREFIX=$(ROOTFS_INSTALL)
	@echo $@ done

busybox_clean:
	@$(MAKE) -C busybox-1.24.1 clean
	@echo $@ done

busybox_install:
	@cd $(ROOTFS_INSTALL) && \
		mkdir -p home root opt mnt media tmp var boot proc sys dev usr lib bin etc sbin
	@$(MAKE) -C busybox-1.24.1 ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) \
		CONFIG_PREFIX=$(ROOTFS_INSTALL) install
	@cp update/* $(ROOTFS_INSTALL) -af
	@cp $(ROOTFS_LIBS) $(ROOTFS_INSTALL)/lib
	@echo $@ done

#==================================================================================================
# tslib-1.4
#==================================================================================================

tslib_config:
	@cd tslib-1.4 && \
	./autogen.sh && \
	./configure --prefix=$(ROOTFS_INSTALL)/usr --host=$(HOST)
	@echo $@ done

tslib_build:
	$(MAKE) -C tslib-1.4
	@echo $@ done

tslib_clean:
	$(MAKE) -C tslib-1.4 clean
	@echo $@ done

tslib_install:
	$(MAKE) -C tslib-1.4 install
	@echo $@ done


#==================================================================================================
# tools
#==================================================================================================
config: busybox_config tslib_config
	@echo rootfs_config done

build: busybox_build tslib_build
	@echo rootfs_build done

clean: busybox_clean tslib_clean
	@echo rootfs_clean done

install: busybox_install tslib_install
	@echo rootfs_install done








